#!/bin/sh

# 定义一个函数用于删除指定目录
clean_dir() {
  if [ -d "$1" ]; then
    rm -rf "$1"
    echo "Removed $1"
  fi
}

# 删除 packages 目录下所有子目录的 dist 和 node_modules 目录
for dir in packages/*/; do
  clean_dir "$dir/dist"
  clean_dir "$dir/node_modules"
done

# 删除当前目录下的 node_modules 目录
clean_dir "node_modules"

echo "💐 Clear done!"